package com.aioething.iot.framework;


import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;

@Setter
@Getter
@ToString
@AllArgsConstructor
public class Result {
    private int status;
    private String message;
    private Object data;

    public static Result Ok(Object data) {
        return new Result(200, "success", data);
    }

    public static Result Ok() {
        return new Result(200, "ok", null);
    }

    public static Result Error(String message) {
        return new Result(500, message, null);
    }
}
